/**
 * @Author: Boring
 * @Description:
 * @File:  deployment
 * @Date: 2024-03-02 14:50
 */

package deployment

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/deployment"
)

func create(deploymentGroup *gin.RouterGroup) {
	deploymentGroup.POST("/create", deployment.Create)
}

func update(deploymentGroup *gin.RouterGroup) {
	deploymentGroup.PUT("/update", deployment.Update)
}

func delete(deploymentGroup *gin.RouterGroup) {
	deploymentGroup.DELETE("/delete", deployment.Delete)
}

func deleteList(deploymentGroup *gin.RouterGroup) {
	deploymentGroup.POST("/deleteList", deployment.DeleteList)
}

func get(deploymentGroup *gin.RouterGroup) {
	deploymentGroup.GET("/get", deployment.Get)
}

func list(deploymentGroup *gin.RouterGroup) {
	deploymentGroup.GET("/list", deployment.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	deploymentGroup := g.Group("/deployment")
	create(deploymentGroup)
	update(deploymentGroup)
	delete(deploymentGroup)
	deleteList(deploymentGroup)
	get(deploymentGroup)
	list(deploymentGroup)
}
